<template>
  <Modal
    v-model:visible="visible"
    :title="$t('Appliance.LearningProgram.Feedback.Notice.Title')"
    :ok-text="$t('Appliance.LearningProgram.Feedback.Notice.Confirm')"
    :cancel-text="$t('APP.Common.Cancel.Text')"
    @ok="emit('confirm')"
  >
    <text>{{ $t('Appliance.LearningProgram.Feedback.Notice.Content') }}</text>
  </Modal>
</template>

<script setup lang="ts">
import Modal from '@/common/modal.vue'

const props = defineProps<{
  show: boolean
}>()
const emit = defineEmits<{
  (e: 'update:show', show: boolean): void
  (e: 'close'): void
  (e: 'confirm'): void
}>()
const visible = computed({
  get() {
    return props.show
  },
  set(show) {
    emit('update:show', show)
    !show && emit('close')
  },
})
</script>
